//上传图片通用方法，传入上传路径，文件地址
const uploadImage = (url, path, callBack) => {
  wx.uploadFile({
    url: url,
    filePath: path,
    name: 'file',
    success: res => {
      const resData = res.data;
      const innerData = JSON.parse(resData);
      const { data: { url } } = innerData;
      callBack(url);
    },
  })
}

module.exports = {
  uploadImage: uploadImage,

}